NO-JIRA: Flaky test fix testDistributedQueryDoesNotReadFromZk #4429
Open
mlbiscoc wants to merge 1 commit into
Open
NO-JIRA: Flaky test fix testDistributedQueryDoesNotReadFromZk #4429mlbiscoc wants to merge 1 commit into
mlbiscoc wants to merge 1 commit into
Conversation
dsmiley
reviewed
May 18, 2026
Contributor
dsmiley
left a comment
There was a problem hiding this comment.
Given that node 1 doesn't even have secondColl, I'm surprised we can nonetheless do a waitForState on this collection since I don't expect it'd be notified that it even exists. Am I wrong?
I add some other trivial comments; ignore or do as you like.
| public void testDistributedQueryDoesNotReadFromZk() throws Exception { | ||
| final String secondColl = "secondColl"; | ||
|
|
||
| // Create a collection on only 1 node so the other node uses LazyCollectionRef for state |
Contributor
There was a problem hiding this comment.
Suggested change
| // Create a collection on only node 0; node 1 will use LazyCollectionRef for state |
Clarifying the node numbers rather than generally referring to a single/other node. Definitely wasn't wrong but now it jives with get(0) vs get(1).
| cluster | ||
|
|
||
| // Wait on node 1's ZkStateReader (not the cluster client's) to check for ready state | ||
| JettySolrRunner nodeWithoutSecondColl = jettys.get(1); |
Contributor
There was a problem hiding this comment.
I love this var name. Maybe node 0 should have a similar var name we can use like "nodeWithBothColls". Just an idea.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
testDistributedQueryDoesNotReadFromZkis a flaky test on Crave and Jenkins. I am not able to reproduce this locally but the error is:My suspicion is that there is a race condition making it flaky where the jetty node has not yet seen the updated state of the collection that it is ready but the client has because we were waiting on separate
zkStateReaderwhich is separate from the cached state from the actually jetty node and collection. So instead, we wait on that jetty nodes ready state using it's zkStateReader and not clients.